package com.students.demo;

public class Student {
    public int id;
    public String name;
    public String sex;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
//有返回值不能用void
    public  Student(int id, String name,String sex) {
        this.id = id;
        this.name = name;
        this.sex = sex;
    }
    //有返回值类型为String不能用void
    public String toString(){
        return("学员信息为:{id="+id+",name="+name+",sex="+sex+"}");
    }
}
